fix: make harness PR reviewer evaluate against the PR base branch - #2107
Open
notgitika wants to merge 2 commits into
Open
fix: make harness PR reviewer evaluate against the PR base branch#2107notgitika wants to merge 2 commits into
notgitika wants to merge 2 commits into
Conversation
added 2 commits
August 25, 2026 21:56
The AI PR reviewer's local context clones sit on the default branch (main), so PRs targeting the refactor branch were reviewed against the main source layout — producing findings about files and code paths that do not exist on refactor (e.g. src/cli / src/lib vs src/handlers / src/core). Instruct the reviewer, in both the system and review prompts, to sync the local clone to the PR's base branch before reading files for context, and to not raise findings premised on a file or path being absent without verifying against that base branch.
CLONE_TOKEN is a build-time ARG (git config only), not present at container runtime, so the Authorization header would send an empty bearer and 401 — yielding a null base ref and a failed checkout back to main. aws/agentcore-cli is public, so drop the header.
Contributor
Package TarballHow to installgh release download pr-2107-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.28.0.tgz |
Contributor
Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parity port to
mainof #2106 (which targetsrefactor).Problem
The AI PR reviewer reviews PRs against the default branch (
main) rather than the PR's actual base branch, because its local context clones sit onmain. PRs targetingrefactorget analyzed against themainsource layout, producing confidently-wrong findings (e.g. citingsrc/cli/src/libfiles that don't exist onrefactor, which usessrc/handlers/src/core).Fix
Updates the reviewer prompts (on
mainthese live atexamples/AgentCoreCliReviewer/app/PRReviewer/):base.ref(unauthenticated call — the repo is public and no runtime token exists) andgit fetch/checkoutit in the local clone before reading files for context; don't raise "file/path missing" findings without verifying against that base branch.refactordiverges frommain(different top-level layout).Notes
refactor).pull_request_targetreads prompts from the base branch, so both branches need the change.aws/agentcore-devx-devtools; this is the in-repo stopgap.